#include "app/app_runner.h"
#include "deamon/deamon_runner.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static void print_usage()
{
    printf("Usage: gateway app|deamon|ota\n");
}

int main(int argc, char const *argv[])
{
    if(argc <= 1)
    {
        // 参数不足
        print_usage();
        exit(EXIT_FAILURE);

    }

    if (strcmp(argv[1], "app") == 0) {
        app_runner_run();
    }
    else if (strcmp(argv[1], "deamon") == 0) {
        deamon_runner_run();
    }
    else if (strcmp(argv[1], "ota") == 0) {
    
    } else {
        print_usage();
    }
    return 0;
}